<template>
  <div class="bot">
    <van-tabbar v-model="activeTwo" active-color="#c2463a" inactive-color="#8e8e8e" safe-area-inset-bottom border  >
      <van-tabbar-item icon="home-o" to="/index">发现</van-tabbar-item>
      <van-tabbar-item icon="video-o" to="/videopag">视频</van-tabbar-item>
      <van-tabbar-item icon="service-o" to="/wode">我的</van-tabbar-item>
      <van-tabbar-item icon="friends-o" dot to="/py">朋友</van-tabbar-item>
      <van-tabbar-item icon="contact" info="99"  to="/myuser">账号</van-tabbar-item>
    </van-tabbar>
  </div>

</template>

<script>
  export default {
    name: "menuBar",
    data(){
      return{
        activeTwo:0,
      }
    },
    created() {
      if (this.$route.name === "index") {
        this.activeTwo = 0;
      } else if (this.$route.name === "videopag") {
        this.activeTwo = 1;
      }else if (this.$route.name === "wode") {
        this.activeTwo = 2;
      }
      else if (this.$route.name === "py") {
        this.activeTwo = 3;
      }
      else if (this.$route.name === "foucslist") {
        this.activeTwo = 3;
      }
      else if (this.$route.name === "myuser") {
        this.activeTwo = 4;
      }
      else if (this.$route.name === "myfloow") {
        this.activeTwo = 4;
      }
    }
  };

</script>

<style lang="scss">
  .bot{
    position: fixed;
    bottom: 0;
    z-index: 999;
    height: 145px;
    width: 100%;

    background: #eae8e8;

  }
</style>
